package Phase2;

import java.sql.*;
import java.io.*;
import javax.swing.*;

public class Phase2 {

    private static BufferedReader buff;
    public static int accnum_count = 0;
    public static int segs = 0;

    Phase2() {
    }

    Phase2(int accnum, int max_segs) {
        //throw new UnsupportedOperationException("Not yet implemented");
        accnum_count = accnum;
        segs = max_segs;
    }

    public static void main(String[] args) throws InstantiationException, IllegalAccessException, IOException, SQLException {
        try {
            DBDriver.loadDriver();
            DBDriver.makeConnection();
            Phase2 p = new Phase2();
            p = DBDriver.Calculate_Vector_Array();

            /*
            String read_in = "";
            buff = new BufferedReader(new InputStreamReader(System.in));
            System.out.print("Enter Search word : ");
            //read_in = buff.readLine();
            //while(!read_in.toLowerCase().equals("quit")){
            read_in = buff.readLine();
            String searchString = read_in;
            */
            String searchString = "";
            
            while(searchString.isEmpty()){
                searchString = JOptionPane.showInputDialog(" Enter the String to search");
            }
            DBDriver.retrieveData(searchString);
            DBDriver.closeAll();
        //}
        } catch (InstantiationException instantiationException) {
        }


    }
}
   
